package com.zhang.controller;

import com.zhang.pojo.PowerBean;
import com.zhang.service.IPowerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "权限控制接口")
@RestController
@RequestMapping("power")
public class PowerController {
    @Autowired
    private IPowerService powerService;

    @ApiOperation("查询所有的权限")
    @GetMapping("findAll")
    public List<PowerBean> findAll(){
       return powerService.findAll();
    }

    @ApiOperation("根据角色id查询权限集合")
    @GetMapping("findById")
    public String[] findById(int[] id){
            return null;
    }

}
